
const models = {

  'repair.order': {
    extend: BaseClass => {
      class cls extends BaseClass {
      }

      cls.action_repair_cancel_draft = async (id, fields={}, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_repair_cancel_draft',
          args: [ id ],
          kwargs,
        }, fields );
      }

      cls.action_repair_confirm = async (id, fields={}, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_repair_confirm',
          args: [ id ],
          kwargs,
        }, fields );
      }

      cls.action_repair_cancel = async (id, fields={}, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_repair_cancel',
          args: [ id ],
          kwargs,
        }, fields );
      }

      cls.action_invoice_create = async (id, fields={}, group=false, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_invoice_create',
          args: [ id, group ],
          kwargs,
        }, fields );
      }

      cls.action_repair_start = async (id, fields={}, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_repair_start',
          args: [ id ],
          kwargs,
        }, fields );
      }

      cls.action_repair_end = async (id, fields={}, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_repair_end',
          args: [ id ],
          kwargs,
        }, fields );
      }

      cls.action_repair_done = async (id, fields={}, kwargs={}) => {
        return cls.call_as_write_read({
          method: 'action_repair_done',
          args: [ id ],
          kwargs,
        }, fields );
      }

      return cls;
    },
  },

};


export default {
  name: 'repair',
  depends: [ 'stock', 'sale_management', 'account' ],
  models,
};

